
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>HTTP代理 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="19.html" />
    
    
    <link rel="prev" href="17.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    [第一章 系统介绍]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="1.html">
            
                <a href="1.html">
            
                    
                    系统介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="2.html">
            
                <a href="2.html">
            
                    
                    功能特点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    [第二章 快速上手]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="3.html">
            
                <a href="3.html">
            
                    
                    源码地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="4.html">
            
                <a href="4.html">
            
                    
                    服务部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="5.html">
            
                <a href="5.html">
            
                    
                    集成开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="6.html">
            
                <a href="6.html">
            
                    
                    源码测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    [第三章 架构分析]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="7.html">
            
                <a href="7.html">
            
                    
                    系统架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="8.html">
            
                <a href="8.html">
            
                    
                    服务依赖关系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="9.html">
            
                <a href="9.html">
            
                    
                    协议格式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="10.html">
            
                <a href="10.html">
            
                    
                    消息类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="11.html">
            
                <a href="11.html">
            
                    
                    系统配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="12.html">
            
                <a href="12.html">
            
                    
                    功能模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="13.html">
            
                <a href="13.html">
            
                    
                    SPI定制化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    [第四章 深度进阶]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="14.html">
            
                <a href="14.html">
            
                    
                    秘钥交换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="15.html">
            
                <a href="15.html">
            
                    
                    握手及快速重连
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="16.html">
            
                <a href="16.html">
            
                    
                    绑定用户
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="17.html">
            
                <a href="17.html">
            
                    
                    消息推送流程
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.5" data-path="18.html">
            
                <a href="18.html">
            
                    
                    HTTP代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="19.html">
            
                <a href="19.html">
            
                    
                    消息分发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="20.html">
            
                <a href="20.html">
            
                    
                    消息序列化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="21.html">
            
                <a href="21.html">
            
                    
                    消息加密与压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="22.html">
            
                <a href="22.html">
            
                    
                    线程池配置与定制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="23.html">
            
                <a href="23.html">
            
                    
                    上行PUSH
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.11" data-path="24.html">
            
                <a href="24.html">
            
                    
                    广播推送与流控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.12" data-path="25.html">
            
                <a href="25.html">
            
                    
                    广播推送条件过滤
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.13" data-path="26.html">
            
                <a href="26.html">
            
                    
                    消息ACK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.14" data-path="27.html">
            
                <a href="27.html">
            
                    
                    离线消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.15" data-path="28.html">
            
                <a href="28.html">
            
                    
                    服务端启动流程分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.16" data-path="29.html">
            
                <a href="29.html">
            
                    
                    日志模块性能优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.17" data-path="30.html">
            
                <a href="30.html">
            
                    
                    JVM监控与性能分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    [第五章 关联服务]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="31.html">
            
                <a href="31.html">
            
                    
                    Alloc服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="32.html">
            
                <a href="32.html">
            
                    
                    MPNS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    [第六章 SDK接入]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="33.html">
            
                <a href="33.html">
            
                    
                    服务端SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="34.html">
            
                <a href="34.html">
            
                    
                    Android SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="35.html">
            
                <a href="35.html">
            
                    
                    MPushClient(Java)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="36.html">
            
                <a href="36.html">
            
                    
                    MPushClient(Swift)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="37.html">
            
                <a href="37.html">
            
                    
                    MPushClient(Obj-C)
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" >
            
                <span>
            
                    
                    [第七章 常见问题]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="38.html">
            
                <a href="38.html">
            
                    
                    常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="39.html">
            
                <a href="39.html">
            
                    
                    系统压测
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >HTTP代理</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="http&#x4EE3;&#x7406;">HTTP&#x4EE3;&#x7406;</h1>
<h2 id="&#x4F7F;&#x7528;&#x573A;&#x666F;">&#x4F7F;&#x7528;&#x573A;&#x666F;</h2>
<ul>
<li>&#x95EE;&#x9898;<pre><code>&#x524D;&#x9762;&#x6709;&#x63D0;&#x5230;&#x8FC7;http&#x4EE3;&#x7406;&#x8FD9;&#x4E2A;&#x4E1C;&#x897F;&#xFF0C;&#x4F46;&#x5F88;&#x591A;&#x4EBA;&#x4E0D;&#x77E5;&#x9053;&#x8FD9;&#x4E2A;&#x4E1C;&#x897F;&#x8BE5;&#x600E;&#x4E48;&#x7528;&#xFF0C;&#x6216;&#x8005;&#x8BF4;&#x6709;&#x4EC0;&#x4E48;&#x7528;&#xFF1F;&#x4EE5;&#x53CA;&#x5728;&#x4EC0;&#x4E48;&#x573A;&#x666F;&#x4E0B;&#x4F7F;&#x7528;&#xFF1F;
</code></pre></li>
<li>&#x79FB;&#x52A8;APP&#x901A;&#x4FE1;&#x573A;&#x666F;&#x5206;&#x6790;<pre><code>&#x4ECE;&#x4F7F;&#x7528;&#x7684;&#x94FE;&#x63A5;&#x60C5;&#x51B5;&#x6765;&#x770B;&#xFF0C;&#x4E00;&#x822C;&#x53EF;&#x4EE5;&#x5206;&#x4E3A;&#x4E24;&#x5927;&#x7C7B;&#xFF1A;TCP&#x957F;&#x94FE;&#x63A5;&#xFF0C;HTTP&#x77ED;&#x94FE;&#x63A5;&#xFF1B;&#x957F;&#x94FE;&#x63A5;&#x7528;&#x4E8E;&#x6D88;&#x606F;&#x63A8;&#x9001;&#x6216;IM&#x7B49;&#x573A;&#x666F;&#xFF0C;HTTP&#x7528;&#x4E8E;&#x4E1A;&#x52A1;&#x6570;&#x636E;&#x7684;&#x67E5;&#x8BE2;&#x6216;&#x4FEE;&#x6539;&#x3002;&#x867D;&#x7136;&#x4E0D;&#x662F;&#x6240;&#x6709;&#x7684;APP&#x90FD;&#x9700;&#x8981;IM&#x529F;&#x80FD;&#xFF0C;&#x4F46;&#x5927;&#x591A;&#x5E94;&#x7528;&#x90FD;&#x9700;&#x8981;&#x6D88;&#x606F;&#x63A8;&#x9001;&#x529F;&#x80FD;&#x3002;&#x4E3A;&#x4E86;&#x63A8;&#x9001;&#x6D88;&#x606F;&#xFF0C;APP&#x5FC5;&#x987B;&#x7EF4;&#x6301;&#x4E00;&#x6839;&#x957F;&#x94FE;&#x63A5;&#xFF0C;&#x4F46;&#x5927;&#x90E8;&#x5206;&#x65F6;&#x95F4;&#x9664;&#x4E86;&#x5FC3;&#x8DF3;&#x8FD9;&#x6839;&#x94FE;&#x63A5;&#x4E0A;&#x662F;&#x6CA1;&#x591A;&#x5C11;&#x6D88;&#x606F;&#x5728;&#x4F20;&#x8F93;&#x7684;&#xFF0C;&#x7279;&#x522B;&#x662F;&#x975E;IM&#x7C7B;&#x7684;APP&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x7C7B;&#x5E94;&#x7528;&#x5E76;&#x6CA1;&#x5927;&#x91CF;&#x7684;&#x6D88;&#x606F;&#x8981;&#x4E0D;&#x505C;&#x7684;&#x63A8;&#x9001;&#xFF0C;&#x7EF4;&#x6301;&#x957F;&#x94FE;&#x63A5;&#x53EA;&#x662F;&#x4E3A;&#x4E86;&#x6D88;&#x606F;&#x7684;&#x53CA;&#x65F6;&#x5230;&#x8FBE;&#xFF0C;&#x8FD9;&#x52BF;&#x5FC5;&#x9020;&#x6210;&#x4E86;&#x5F88;&#x5927;&#x7684;&#x8D44;&#x6E90;&#x6D6A;&#x8D39;&#xFF01;
</code></pre></li>
<li>&#x89E3;&#x51B3;&#x65B9;&#x6848;<pre><code>&#x9488;&#x5BF9;&#x4E0A;&#x8FF0;&#x60C5;&#x51B5;MPUSH&#x63D0;&#x4F9B;&#x4E86;Http&#x4EE3;&#x7406;&#x65B9;&#x6848;&#xFF0C;&#x76EE;&#x7684;&#x4E00;&#x662F;&#x5145;&#x5206;&#x5229;&#x7528;push&#x901A;&#x9053;&#xFF0C;&#x800C;&#x662F;&#x63D0;&#x9AD8;&#x6570;&#x636E;&#x4F20;&#x8F93;&#x6548;&#x7387;&#x8282;&#x7701;&#x7535;&#x91CF;&#xFF0C;&#x8282;&#x7701;&#x6D41;&#x91CF;&#xFF0C;&#x63D0;&#x4F9B;&#x6BD4;http&#x66F4;&#x9AD8;&#x7684;&#x5B89;&#x5168;&#x6027;&#x3002;
</code></pre></li>
<li>&#x5B9E;&#x73B0;&#x539F;&#x7406;<pre><code>MPushClient &#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x53EB;`sendHttp`&#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x8BE5;&#x65B9;&#x6CD5;&#x7528;&#x4E8E;&#x628A;&#x5BA2;&#x6237;&#x7AEF;&#x539F;&#x672C;&#x8981;&#x901A;&#x8FC7;HTTP&#x65B9;&#x5F0F;&#x53D1;&#x9001;&#x7684;&#x8BF7;&#x6C42;&#xFF0C;&#x5168;&#x90E8;&#x901A;&#x8FC7;PUSH&#x901A;&#x9053;&#x8F6C;&#x53D1;&#xFF0C;&#x5B9E;&#x73B0;&#x6574;&#x4E2A;&#x94FE;&#x8DEF;&#x7684;&#x957F;&#x94FE;&#x63A5;&#x5316;&#xFF1B;&#x901A;&#x8FC7;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;&#x5E94;&#x7528;&#x5927;&#x5927;&#x51CF;&#x5C11;Http&#x77ED;&#x94FE;&#x63A5;&#x9891;&#x7E41;&#x7684;&#x521B;&#x5EFA;&#xFF0C;&#x4E0D;&#x4EC5;&#x4EC5;&#x8282;&#x7701;&#x7535;&#x91CF;&#xFF0C;&#x7ECF;&#x8FC7;&#x6D4B;&#x8BD5;&#x8BC1;&#x660E;&#x8BF7;&#x6C42;&#x65F6;&#x95F4;&#x6BD4;&#x539F;&#x6765;&#x81F3;&#x5C11;&#x7F29;&#x77ED;&#x4E00;&#x500D;&#xFF0C;&#x800C;&#x4E14;MPush&#x63D0;&#x4F9B;&#x7684;&#x8FD8;&#x6709;&#x6570;&#x636E;&#x538B;&#x7F29;&#x529F;&#x80FD;&#xFF0C;&#x5BF9;&#x4E8E;&#x6BD4;&#x8F83;&#x5927;&#x7684;&#x6570;&#x636E;&#x8FD8;&#x80FD;&#x5927;&#x5927;&#x8282;&#x7701;&#x6D41;&#x91CF;(&#x538B;&#x7F29;&#x7387;4-10&#x500D;)&#xFF0C;&#x66F4;&#x91CD;&#x8981;&#x7684;&#x662F;&#x6240;&#x6709;&#x901A;&#x8FC7;&#x4EE3;&#x7406;&#x7684;&#x6570;&#x636E;&#x90FD;&#x662F;&#x52A0;&#x5BC6;&#x540E;&#x4F20;&#x8F93;&#x7684;&#xFF0C;&#x5927;&#x5927;&#x63D0;&#x9AD8;&#x4E86;&#x5B89;&#x5168;&#x6027;&#xFF01;
</code></pre><h3 id="&#x4F7F;&#x7528;&#x65B9;&#x5F0F;">&#x4F7F;&#x7528;&#x65B9;&#x5F0F;</h3>
</li>
<li>&#x670D;&#x52A1;&#x7AEF;</li>
</ul>
<p>1.&#x4FEE;&#x6539;<code>mpush.conf</code>&#x589E;&#x52A0;<code>mp.http.proxy-enabled=true</code>&#x542F;&#x7528;http&#x4EE3;&#x7406;</p>
<p>2.&#x4FEE;&#x6539;<code>mpush.conf</code>&#x589E;&#x52A0;<code>dns-mapping</code>&#x914D;&#x7F6E;&#xFF0C;&#x793A;&#x4F8B;&#x5982;&#x4E0B;</p>
<pre><code>mp.http.dns-mapping={//&#x57DF;&#x540D;&#x6620;&#x5C04;&#x5916;&#x7F51;&#x5730;&#x5740;&#x8F6C;&#x5185;&#x90E8;IP
  &quot;api.jituancaiyun.com&quot;:[&quot;10.0.10.1:8080&quot;, &quot;10.0.10.2:8080&quot;]
}
&#x200B;
</code></pre><pre><code>&#x8BF4;&#x660E;&#xFF1A;&#x56E0;&#x4E3A;mpush server&#x8981;&#x505A;http&#x4EE3;&#x7406;&#x8F6C;&#x53D1;&#xFF0C;&#x800C;&#x5BA2;&#x6237;&#x7AEF;&#x4F20;&#x8FC7;&#x6765;&#x7684;&#x4E00;&#x822C;&#x662F;&#x57DF;&#x540D;&#x6BD4;&#x5982;http://api.jituancaiyun.com/get/userInfo.json&#x4E3A;&#x4E86;&#x4E0D;&#x5230;&#x516C;&#x7F51;&#x4E0A;&#x518D;&#x7ED5;&#x4E00;&#x5708;&#x5EFA;&#x8BAE;&#x628A;mpush server &#x548C;&#x4E1A;&#x52A1;&#x670D;&#x52A1;(api.jituancaiyun.com)&#x90E8;&#x7F72;&#x5230;&#x540C;&#x4E00;&#x4E2A;&#x5C40;&#x57DF;&#x7F51;&#xFF0C;&#x5E76;&#x589E;&#x57DF;&#x540D;api.jituancaiyun.com&#x5230;&#x63D0;&#x4F9B;&#x8BE5;&#x670D;&#x52A1;&#x7684;&#x96C6;&#x7FA4;&#x673A;&#x5668;&#x5185;&#x7F51;ip&#x4E4B;&#x95F4;&#x7684;&#x4E00;&#x4E2A;&#x6620;&#x5C04;&#xFF0C;&#x8FD9;&#x6837;mpush server&#x5C31;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5C40;&#x57DF;&#x7F51;&#x628A;&#x8BF7;&#x6C42;&#x8F6C;&#x53D1;&#x5230;&#x5177;&#x4F53;&#x5230;&#x4E1A;&#x52A1;&#x670D;&#x52A1;&#xFF0C;&#x6548;&#x7387;&#x66F4;&#x9AD8;&#xFF01;
</code></pre><ul>
<li>&#x5BA2;&#x6237;&#x7AEF;</li>
</ul>
<p>1.&#x8BBE;&#x7F6E;<code>ClientConfig.setEnableHttpProxy(true)</code>&#x6765;&#x542F;&#x7528;&#x5BA2;&#x6237;&#x7AEF;&#x4EE3;&#x7406;&#x3002;</p>
<p>2.&#x901A;&#x8FC7;<code>Client.sendHttp(HttpRequest request)</code>&#x65B9;&#x6CD5;&#x6765;&#x53D1;&#x9001;&#x8BF7;&#x6C42;&#x3002;</p>
<pre><code>AndroidSDK&#x901A;&#x8FC7;com.mpush.android.MPush#sendHttpProxy(HttpRequest request)&#x6765;&#x53D1;&#x9001;&#x6BD4;&#x8F83;&#x5408;&#x9002;&#x3002;
</code></pre><h3 id="&#x6D41;&#x7A0B;&#x5206;&#x6790;">&#x6D41;&#x7A0B;&#x5206;&#x6790;</h3>
<p><img src="images/9.JPG?raw=true" align="center"></p>
<h3 id="&#x8BF4;&#x660E;">&#x8BF4;&#x660E;</h3>
<p>1.Client&#x4EE3;&#x8868;App&#x4E1A;&#x52A1;&#x6BD4;&#x5982;&#x67E5;&#x8BE2;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x7684;&#x63A5;&#x53E3;</p>
<p>2.MPushApiProxy&#x662F;&#x4E00;&#x4E2A;&#x5DE5;&#x5177;&#x7C7B;&#x7528;&#x4E8E;&#x8D1F;&#x8D23;&#x5904;&#x7406;&#x5F53;&#x524D;&#x8BF7;&#x6C42;&#x662F;&#x4F7F;&#x7528;&#x666E;&#x901A;&#x7684;HTTP&#x8FD8;&#x662F;&#x4F7F;&#x7528;MPush&#x957F;&#x94FE;&#x63A5;&#x901A;&#x9053;&#xFF0C;&#x8FD9;&#x4E2A;&#x7C7B;&#x5728;SDK&#x4E2D;&#x8BF4;&#x4E0D;&#x5B58;&#x5728;&#x7684;&#xFF0C;&#x662F;&#x6211;&#x4EEC;&#x516C;&#x53F8;&#x5185;&#x90E8;&#x7684;&#x4E1A;&#x52A1;&#xFF0C;&#x5B9E;&#x73B0;&#x8D77;&#x6765;&#x4E5F;&#x5F88;&#x7B80;&#x5355;&#xFF0C;&#x5EFA;&#x8BAE;Android&#x5DE5;&#x7A0B;&#x4E2D;&#x589E;&#x52A0;&#x8FD9;&#x4E48;&#x4E00;&#x4E2A;&#x89D2;&#x8272;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x5230;&#x5904;&#x76F4;&#x63A5;&#x53BB;&#x4F9D;&#x8D56;Mpush&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x65B9;&#x4FBF;&#x4EE5;&#x540E;&#x89E3;&#x8026;&#x3002;</p>
<p>3.MPushClient&#x8FD9;&#x4E2A;SDK&#x5DF2;&#x7ECF;&#x63D0;&#x4F9B;&#xFF0C;&#x7528;&#x4E8E;&#x628A;Http&#x534F;&#x8BAE;&#x6253;&#x5305;&#x6210;mpush&#x534F;&#x8BAE;&#x3002;</p>
<p>4.HttpProxyHandler&#x5305;&#x62EC;&#x540E;&#x9762;&#x7684;&#x51E0;&#x4E2A;&#x7EC4;&#x4EF6;&#x90FD;&#x662F;&#x670D;&#x52A1;&#x7AEF;&#x4E1A;&#x52A1;&#x7EC4;&#x4EF6;&#x3002;&#x7528;&#x4E8E;&#x63A5;&#x6536;&#x5BA2;&#x6237;&#x7AEF;&#x4F20;&#x8FC7;&#x6765;&#x7684;&#x8BF7;&#x6C42;&#x5E76;&#x53CD;&#x89E3;&#x4E3A;Http&#x534F;&#x8BAE;&#xFF0C;&#x7136;&#x540E;&#x901A;&#x8FC7;DNSMapping&#x627E;&#x5230;&#x57DF;&#x540D;&#x5BF9;&#x5E94;&#x7684;&#x5C40;&#x57DF;&#x7F51;IP&#xFF0C;&#x518D;&#x901A;&#x8FC7;&#x5185;&#x7F6E;&#x7684;HttpClient&#xFF0C;&#x628A;&#x8BF7;&#x6C42;&#x8F6C;&#x53D1;&#x7ED9;&#x4E1A;&#x52A1;WEB&#x670D;&#x52A1;&#xFF0C;&#x5E76;&#x628A;&#x4E1A;&#x52A1;&#x670D;&#x52A1;&#x7684;&#x8FD4;&#x56DE;&#x503C;(HttpResponse)&#x6253;&#x5305;&#x6210;MPush&#x534F;&#x8BAE;&#x53D1;&#x9001;&#x5230;&#x5BA2;&#x6237;&#x7AEF;&#x3002;</p>
<p>5.DNSMapping&#x8D1F;&#x8D23;&#x901A;&#x8FC7;&#x57DF;&#x540D;&#x89E3;&#x6790;&#x6210;&#x5C40;&#x57DF;&#x7F51;IP&#xFF0C;&#x5E76;&#x5177;&#x6709;&#x8D1F;&#x8F7D;&#x5747;&#x8861;&#x4EE5;&#x53CA;&#x7B80;&#x5355;&#x7684;&#x5065;&#x5EB7;&#x68C0;&#x67E5;&#x529F;&#x80FD;(&#x9488;&#x5BF9;&#x6240;&#x914D;&#x7F6E;&#x7684;WEB&#x670D;&#x52A1;)</p>
<p>6.HttpClient&#x76EE;&#x524D;&#x4F7F;&#x7528;&#x7684;&#x662F;&#x7528;Netty&#x5B9E;&#x73B0;&#x7684;&#x5168;&#x5F02;&#x6B65;&#x7684;&#x4E00;&#x4E2A;HttpClient&#xFF0C;&#x8D1F;&#x8D23;&#x901A;&#x8FC7;http&#x7684;&#x65B9;&#x5F0F;&#x8BF7;&#x6C42;&#x4E1A;&#x52A1;&#x670D;&#x52A1;&#x3002;</p>
<p>7.Nginx&#x662F;&#x4E1A;&#x52A1;&#x670D;&#x52A1;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;Tomcat&#xFF0C;&#x7279;&#x522B;&#x9700;&#x8981;&#x5EFA;&#x8BAE;&#x7684;&#x662F;&#x94FE;&#x63A5;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#x914D;&#x7F6E;&#x957F;&#x4E00;&#x4E9B;&#x3002;</p>
<h3 id="&#x8865;&#x5145;">&#x8865;&#x5145;</h3>
<p>&#x4E3A;&#x4EC0;&#x4E48;&#x8981;&#x8FD9;&#x6837;&#x5B9E;&#x73B0;&#xFF1F;&#x56E0;&#x4E3A;&#x8FD9;&#x6837;&#x505A;&#x5BF9;&#x539F;&#x6709;&#x7684;&#x4E1A;&#x52A1;&#x7CFB;&#x7EDF;&#x4FB5;&#x5165;&#x7279;&#x522B;&#x4F4E;&#xFF0C;&#x5982;&#x679C;MPushApiProxy&#x8FD9;&#x4E2A;&#x7EC4;&#x4EF6;&#x8BBE;&#x8BA1;&#x7684;&#x597D;&#xFF0C;&#x5BF9;&#x4E8E;&#x6700;&#x4E24;&#x8FB9;&#x7684;&#x4E1A;&#x52A1;&#x7EC4;&#x4EF6;/&#x670D;&#x52A1;(Client,Nginx)&#xFF0C;&#x5BF9;&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#x5E94;&#x8BE5;&#x662F;&#x65E0;&#x611F;&#x77E5;&#x7684;&#xFF0C;&#x8FD9;&#x4E2A;&#x89D2;&#x8272;&#x662F;&#x65E0;&#x6CD5;&#x533A;&#x5206;&#x5230;&#x5E95;&#x8BF7;&#x6C42;&#x662F;&#x901A;&#x8FC7;&#x666E;&#x901A;&#x7684;Http&#x65B9;&#x5F0F;&#x53D1;&#x9001;&#x51FA;&#x53BB;&#x7684;&#x8FD8;&#x662F;&#x901A;&#x8FC7;&#x957F;&#x94FE;&#x63A5;&#x4EE3;&#x7406;&#x7684;&#x65B9;&#x5F0F;&#x53D1;&#x9001;&#x7684;&#xFF01;&#xFF01;&#xFF01;</p>
<h5 id="&#x53E6;&#x9644;&#x4E0A;&#x901A;&#x8FC7;http-proxy-&#x5B9E;&#x73B0;&#x53CC;&#x5411;&#x901A;&#x4FE1;&#x4EA4;&#x4E92;&#x56FE;">&#x53E6;&#x9644;&#x4E0A;&#x901A;&#x8FC7;Http Proxy &#x5B9E;&#x73B0;&#x53CC;&#x5411;&#x901A;&#x4FE1;&#x4EA4;&#x4E92;&#x56FE;</h5>
<p><img src="images/10.JPG?raw=true" align="center"></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="17.html" class="navigation navigation-prev " aria-label="Previous page: 消息推送流程">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="19.html" class="navigation navigation-next " aria-label="Next page: 消息分发">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"HTTP代理","level":"1.5.5","depth":2,"next":{"title":"消息分发","level":"1.5.6","depth":2,"path":"19.md","ref":"19.md","articles":[]},"previous":{"title":"消息推送流程","level":"1.5.4","depth":2,"path":"17.md","ref":"17.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"18.md","mtime":"2023-05-21T16:30:10.961Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-06-26T16:20:41.295Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

